public class LInChannel extends LImport
| Modifier and Type | Field and Description |
|---|---|
protected long |
end |
protected java.nio.channels.FileChannel |
iChannel |
protected java.io.FileInputStream |
iStream |
| Constructor and Description |
|---|
LInChannel() |
LInChannel(java.io.File f) |
LInChannel(LInChannel rhs,
long allocation) |
LInChannel(java.lang.String path) |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close()
Closes streams.
|
byte[] |
extract(int amount)
Reads in amount of bytes and converts them to integers.
Moves position forward. |
java.nio.ByteBuffer |
extractByteBuffer(int skip,
int read)
Reads in the desired bytes and wraps them in a ByteBuffer.
|
byte[] |
extractUntil(int delimiter)
Reads in bytes until the delimiter is read.
|
java.lang.Boolean |
isDone() |
void |
openFile(java.io.File f) |
void |
openFile(java.lang.String path) |
long |
pos() |
void |
pos(long pos) |
int |
read()
Reads in a byte and moves forward one position in the file.
|
protected void |
slice(LInChannel rhs,
long allocation) |
long |
transferTo(long position,
long count,
java.nio.channels.WritableByteChannel target) |
correctForCompression, extract, extractAllBytes, extractAllString, extractBool, extractFloat, extractInt, extractInt, extractInts, extractInts, extractIntSigned, extractLine, extractLong, extractString, extractString, extractString, extractUntil, extractUntil, extractUntil, extractUntil, getAllBytes, getBytes, getInts, getString, getString, jumpBack, scanTo, skipprotected java.io.FileInputStream iStream
protected java.nio.channels.FileChannel iChannel
protected long end
public LInChannel()
public LInChannel(java.lang.String path)
path - Path to open a channel to.public LInChannel(java.io.File f)
f - File to open a channel to.public LInChannel(LInChannel rhs, long allocation)
rhs - allocation - protected void slice(LInChannel rhs, long allocation)
rhs - allocation - public void openFile(java.lang.String path)
path - Path to open a channel to.public void openFile(java.io.File f)
f - File to open a channel to.public int read()
public java.nio.ByteBuffer extractByteBuffer(int skip,
int read)
skip - Bytes to skipread - Bytes to read and convertpublic void pos(long pos)
public final int available()
public byte[] extract(int amount)
LImportpublic byte[] extractUntil(int delimiter)
LImportextractUntil in class LImportdelimiter - int to stop reading at.public long transferTo(long position,
long count,
java.nio.channels.WritableByteChannel target)
throws java.io.IOException
position - count - target - java.io.IOException